package com.netease.nie.base.machine;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 
 * @author KingsHunter
 * @createDate July 18th,2016
 *
 */
@Component
public class MachineConfig {

	@Value("${machine.number}")
	private String machineNumber;

	public String getMachineNumber() {
		int len = machineNumber.length();
		if (len < 2)
			machineNumber = "0" + machineNumber;
		return machineNumber;
	}

	public void setMachineNumber(String machineNumber) {
		this.machineNumber = machineNumber;
	}
}
